<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <script type="text/javascript" src="/static/plugins/eChart/echarts.min.js"></script>
    <script type="text/javascript" src="/static/plugins/echartsTheme/chalk.js"></script>
</head>
<body>
<div id="main" style="width:590px;height:450px" fit="true"></div>
<script>
    // 第二个参数可以指定前面引入的主题
    var myChart  = echarts.init(document.getElementById('main'), 'chalk');
    option = {
        title : {
            text: '销售报表',
            subtext: '${groupType}',
            x:'center'
        },
        tooltip : {
            trigger: 'item',
            formatter: "{a} <br/>{b} : {c} ({d}%)"
        },
        legend: {
            orient: 'vertical',
            left: 'left',
            data: ${x}
        },
        series : [
            {
                name: '访问来源',
                type: 'pie',
                radius : '55%',
                center: ['50%', '60%'],
                data:${datas},
                itemStyle: {
                    emphasis: {
                        shadowBlur: 10,
                        shadowOffsetX: 0,
                        shadowColor: 'rgba(0, 0, 0, 0.5)'
                    }
                }
            }
        ]
    };

    // 使用刚指定的配置项和数据显示图表。
    myChart.setOption(option);
</script>
</body>
</html>